{extend name="layout/main" /}

{block name="header"}

{/block}

{block name="content"}
<script src="__STATIC__/admin/js/laydate/laydate.js"></script>
<section class="panel">
    <header class="panel-heading">
        <h4>拼团信息</h4>
    </header>
    <div class="panel-body" style="padding-bottom: 50px">
        <form class="form-horizontal" action="{:url('admin/wallet/withdrawal')}" >
            <div class="form-group">

                <div class="col-xs-1 no-pd-r">
                    <select name="type" class="form-control">
                        <option {if $Request.get.type == 'nick_name'} selected {/if} value="nick_name">用户名称</option>
                    </select>
                </div>
                <div class="col-xs-3 no-pd-l">
                    <input type="text" value="{$Request.get.keyword}" name="keyword" class="form-control" placeholder="请输入关键词搜索">
                </div>

                <button type="submit" class="btn btn-color">搜索</button>
            </div>
        </form>
        <table class="table table-bordered table-striped no-margin">
            <thead>
            <tr>
                <th class="text-center">ID</th>
                <th class="text-center">用户信息</th>
                <th class="text-center">拼团商品</th>
                <th class="text-center">成团人数</th>
                <th class="text-center">已拼人数</th>
                <th class="text-center">状态</th>
                <th class="text-center">时间</th>
                <th class="text-center">操作</th>
            </tr>
            </thead>
            <tbody>
            {if $list}
            {foreach $list as $order}
            <tr>
                <td class="text-center">{$order->id}</td>
                <td class="text-center">
                    手机号：{$order.mobile}<br>
                    昵称：{$order->nick_name}
                </td>
                <td class="text-center">
                    商品id:{$order.goodsid}<br>商品：{$order.title}
                </td>
                <td class="text-center">{$order->number}</td>
                <td class="text-center">{$order->havenumber}</td>
                <td class="text-center">
                    {if $order->status ==0}
                        拼团中
                    {elseif $order->status == -1}
                        未付款
                    {elseif $order->status == 1}
                        已完成
                    {/if}
                </td>
                <td class="text-center">
                    下单时间：{$order->createtime|date="Y-m-d H:i:s"}<br>
                    结束时间：{$order->overtime|date="Y-m-d H:i:s"}<br>
                </td>
                <td class="text-center">
                    <a href="{:url('goodsorders/index',['groupid'=>$order->id])}"  class="btn btn-xs btn-success">查看拼团</a>
                </td>
            </tr>
            {/foreach}
            {else /}
            <tr class="text-center">
                <td colspan="8">暂无数据</td>
            </tr>
            {/if}
            </tbody>
        </table>
        <div class="page">
            {:htmlspecialchars_decode($list->render())}
        </div>
    </div>
</section>
<script>
    laydate.render({
        elem: '#startTime',
        type: 'datetime'
    });
    laydate.render({
        elem: '#endTime',
        type: 'datetime'
    });
</script>
{/block}


{block name="footer"}

{/block}
